
var UserMgr = {
	init: function(){
		 var store = new Ext.data.JsonStore({
        	root: 'data',
        	totalProperty: 'total',
        	fields: [
    	    	"number", "name", "email", "dep_number" 
        	],
        	url: "system!fetchPerson.action"
    });

	 var store = new Ext.data.JsonStore({
    	root: 'data',
    	totalProperty: 'total',
    	fields: [
	    	"number", "name", "email", "dep_number" 
    	],
    	url: "system!fetchPerson.action"
	});

    //序号 人员姓名 所属部门 办公电话 手机 邮箱 状态 操作 
	 	new Ext.grid.GridPanel({
    		renderTo: 'user_manager',
	        title:'人员管理列表',
	        store: store,
	        loadMask: true,
	        autoHeight: 400,
	        columns:[
	        	new Ext.grid.RowNumberer({header: "序号", width: 30}),
	        	{header: "人员姓名", dataIndex: 'name', width: 100},
	        	{header: "所属部门", dataIndex: 'dep_number', width: 70},
	        	{header: "邮箱", dataIndex: 'email', width: 150}
			],
			bbar: new Ext.PagingToolbar({
            	pageSize: 10,
            	store: store
        	})
		});
		store.load({params:{start:0, limit:10}});
	}
}

Ext.onReady(UserMgr.init, UserMgr);